package com.spark.incoicings.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.spark.invoicings.entity.Order;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface OrderMapper extends BaseMapper<Order> {

    /**
     * 根据id获取采购订单
     * @param id
     * @return
     */
    Order selectOrderById(Integer id);

    /**
     * 查询所有采购订单
     * 分页
     * @param map
     * @return
     */
    List<Order> selectOrderAll(Map<String, Object> map);

    /**
     * 查询所有为待出库采购订单
     * @return
     */
    List<Order> selectOrderStatusAll();

    /**
     * 根据供应商id查询所有所属订单
     * @param id
     * @return
     */
    List<Order> selectById(Integer id);

}
